package com.yiyuan.app.entity.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum NoticeTypeEnum {
    JP1(0, "JP1"),
    JP2(1, "JP2"),
    JP3(2, "JP3"),
    ALL(3, "全盘奖"),
    NUMBER(4, "数字奖"),
    CRITICAL(5, "暴击"),
//    ADMIN(6, "后台公告"),
    ;

    private Integer code;

    private String desc;

    NoticeTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static NoticeTypeEnum getByCode(Integer code) {
        for (NoticeTypeEnum enums : NoticeTypeEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
